package main

import (
	"fmt"
	"go-redis/jan-server/run"
	"go-redis/utils"
	"net/http"
	"strconv"
)

func main() {
	port, _ := strconv.Atoi(utils.Cnf.ServerPort)
	server, _ := run.NewServer(port, utils.Cnf.ServerAddress)
	utils.Log.Info(fmt.Sprintf("server start at %s:%s", utils.Cnf.ServerAddress, utils.Cnf.ServerPort))
	http.ListenAndServe(fmt.Sprintf("%s:%s", utils.Cnf.ServerAddress, utils.Cnf.ServerPort), server)
}
